package com.ban.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Ban
 * @version 1.0
 * Create by 2022/1/18 16:34
 */
@RestController
@RefreshScope
public class ConfigClientController {
    @Value("${server.port}")
    public String serverPort;

    @Value("${config.info}")
    public String configInfo;

    @GetMapping("/configInfo")
    public String configInfo(){
        return "serverPort:" + serverPort + "configInfo:" + configInfo;
    }
}
